home *** CD-ROM | disk | FTP | other *** search
/ Macwelt 1 / Macwelt DVD 1.toast / Software für Mac-OS X / Entwickler-Tools / netbeans / modules / ext / djava.jar / koala / dynamicjava / classinfo / TreeFieldInfo.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-03-14  |  1.7 KB  |  43 lines

  1. package koala.dynamicjava.classinfo;
  2.  
  3. import koala.dynamicjava.tree.FieldDeclaration;
  4.  
  5. public class TreeFieldInfo implements FieldInfo {
  6.    private FieldDeclaration fieldTree;
  7.    private ClassFinder classFinder;
  8.    private ClassInfo type;
  9.    private ClassInfo declaringClass;
  10.    private TypeVisitor typeVisitor;
  11.  
  12.    public FieldDeclaration getFieldDeclaration() {
  13.       return this.fieldTree;
  14.    }
  15.  
  16.    public int getModifiers() {
  17.       return this.fieldTree.getAccessFlags();
  18.    }
  19.  
  20.    public ClassInfo getType() {
  21.       if (this.type == null) {
  22.          this.type = (ClassInfo)this.fieldTree.getType().acceptVisitor(this.typeVisitor);
  23.       }
  24.  
  25.       return this.type;
  26.    }
  27.  
  28.    public String getName() {
  29.       return this.fieldTree.getName();
  30.    }
  31.  
  32.    public boolean equals(Object var1) {
  33.       return var1 != null && var1 instanceof TreeFieldInfo ? this.fieldTree.equals(((TreeFieldInfo)var1).fieldTree) : false;
  34.    }
  35.  
  36.    public TreeFieldInfo(FieldDeclaration var1, ClassFinder var2, ClassInfo var3) {
  37.       this.fieldTree = var1;
  38.       this.classFinder = var2;
  39.       this.declaringClass = var3;
  40.       this.typeVisitor = new TypeVisitor(this.classFinder, this.declaringClass);
  41.    }
  42. }
  43.